package com.yanqu.road.entity.activity.greattrade;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

@FieldTypeAnnotation(desc = "大商途", tableName = "t_u_great_trade_user")
public class UserGreatTradeData extends DataObject{

    @FieldTypeAnnotation(select = true, update = true, desc = "活动ID")
    private int activityId;

    @FieldTypeAnnotation(select = true, update = true, desc = "玩家ID")
    private long userId;

    //玩家数据
    @FieldTypeAnnotation(desc = "当天免费商途次数")
    int dayFreeTimes;

    @FieldTypeAnnotation(desc = "当天商途次数")
    int dayTradeTimes;

    @FieldTypeAnnotation(desc = "总商途次数")
    int totalTradeTimes;

    @FieldTypeAnnotation(desc = "购买黄金战令")
    int buyGoldToken;

    @FieldTypeAnnotation(desc = "购买白银战令")
    int buySliverToken;

    @FieldTypeAnnotation(desc = "完成商途次数")
    int completeTimes;

    @FieldTypeAnnotation(desc = "最高称号")
    int maxTitle;

    @FieldTypeAnnotation(desc = "最高资产")
    String maxAssets = "0";

    @FieldTypeAnnotation(desc = "事件统计")
    Map<Integer, Integer> eventMap;

    @FieldTypeAnnotation(desc = "美人技能")
    Map<Integer, GreatTradeBeautySkill> beautyMap;

    @FieldTypeAnnotation(desc = "每次商途状态数据")
    GreatTradeSimpleStatus tradeStatus;

    @FieldTypeAnnotation(desc = "行商物品数量")
    List<GreatTradeGoods> goodsList;

    @FieldTypeAnnotation(desc = "行商物品市场价格")
    Map<Integer, Integer> goodsPriceList;

    @FieldTypeAnnotation(desc = "行商物品历史价格")
    Map<Integer, List<Integer>> goodsHistoryPrice;

   @FieldTypeAnnotation(desc = "产业市场价格")
    List<Map<Integer, Long>> industryPrice;

    @FieldTypeAnnotation(desc = "产业")
    GreatTradeIndustry industry;

    @FieldTypeAnnotation(desc = "外出事件")
    Map<Integer, GreatTradeAreaEvent> areaEventMap = new HashMap<>();

    @FieldTypeAnnotation(desc = "盐场")
    Map<Integer, GreatTradeSaltWorks> saltWorksMap;

    @FieldTypeAnnotation(desc = "进程记录-1:出生；2：开局说明；3：称号变化；4：首次产业购买；5；首次淘宝；6：首次盐场；7：退休；8：资产、名望；9：财神")
    List<GreatTradeMilepostRecord> milepostRecordList;

    @FieldTypeAnnotation(desc = "收益报告")
    List<Map<Integer, String>> profitMap;

    @FieldTypeAnnotation(desc = "重置时间")
    int dayResetTime;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if(this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public int getDayFreeTimes() {
        return dayFreeTimes;
    }

    public void setDayFreeTimes(int dayFreeTimes) {
        if(this.dayFreeTimes != dayFreeTimes) {
            this.dayFreeTimes = dayFreeTimes;
            setUpdateOption();
        }
    }

    public int getDayTradeTimes() {
        return dayTradeTimes;
    }

    public void setDayTradeTimes(int dayTradeTimes) {
        if(this.dayTradeTimes != dayTradeTimes) {
            this.dayTradeTimes = dayTradeTimes;
            setUpdateOption();
        }
    }

    public int getTotalTradeTimes() {
        return totalTradeTimes;
    }

    public void setTotalTradeTimes(int totalTradeTimes) {
        if(this.totalTradeTimes != totalTradeTimes) {
            this.totalTradeTimes = totalTradeTimes;
            setUpdateOption();
        }
    }

    public int getBuyGoldToken() {
        return buyGoldToken;
    }

    public void setBuyGoldToken(int buyGoldToken) {
        if(this.buyGoldToken != buyGoldToken) {
            this.buyGoldToken = buyGoldToken;
            setUpdateOption();
        }
    }

    public int getBuySliverToken() {
        return buySliverToken;
    }

    public void setBuySliverToken(int buySliverToken) {
        if(this.buySliverToken != buySliverToken) {
            this.buySliverToken = buySliverToken;
            setUpdateOption();
        }
    }

    public int getCompleteTimes() {
        return completeTimes;
    }

    public void setCompleteTimes(int completeTimes) {
        if(this.completeTimes != completeTimes) {
            this.completeTimes = completeTimes;
            setUpdateOption();
        }
    }

    public int getMaxTitle() {
        return maxTitle;
    }

    public void setMaxTitle(int maxTitle) {
        if(this.maxTitle != maxTitle) {
            this.maxTitle = maxTitle;
            setUpdateOption();
        }
    }

    public String getMaxAssets() {
        return maxAssets;
    }

    public void setMaxAssets(String maxAssets) {
        if(!Objects.equals(this.maxAssets, maxAssets)) {
            this.maxAssets = maxAssets;
            setUpdateOption();
        }
    }

    public Map<Integer, Integer> getEventMap() {
        return eventMap;
    }

    public void setEventMap(Map<Integer, Integer> eventMap) {
        this.eventMap = eventMap;
        setUpdateOption();
    }

    public Map<Integer, GreatTradeBeautySkill> getBeautyMap() {
        return beautyMap;
    }

    public void setBeautyMap(Map<Integer, GreatTradeBeautySkill> beautyMap) {
        this.beautyMap = beautyMap;
        setUpdateOption();
    }

    public GreatTradeSimpleStatus getTradeStatus() {
        return tradeStatus;
    }

    public void setTradeStatus(GreatTradeSimpleStatus tradeStatus) {
        this.tradeStatus = tradeStatus;
        setUpdateOption();
    }

    public List<GreatTradeGoods> getGoodsList() {
        return goodsList;
    }

    public void setGoodsList(List<GreatTradeGoods> goodsList) {
        this.goodsList = goodsList;
        setUpdateOption();
    }

    public Map<Integer, Integer> getGoodsPriceList() {
        return goodsPriceList;
    }

    public void setGoodsPriceList(Map<Integer, Integer> goodsPriceList) {
        this.goodsPriceList = goodsPriceList;
        setUpdateOption();
    }

    public Map<Integer, List<Integer>> getGoodsHistoryPrice() {
        return goodsHistoryPrice;
    }

    public void setGoodsHistoryPrice(Map<Integer, List<Integer>> goodsHistoryPrice) {
        this.goodsHistoryPrice = goodsHistoryPrice;
        setUpdateOption();
    }

    public List<Map<Integer, Long>> getIndustryPrice() {
        return industryPrice;
    }

    public void setIndustryPrice(List<Map<Integer, Long>> industryPrice) {
        this.industryPrice = industryPrice;
        setUpdateOption();
    }

    public GreatTradeIndustry getIndustry() {
        return industry;
    }

    public void setIndustry(GreatTradeIndustry industry) {
        this.industry = industry;
        setUpdateOption();
    }

    public Map<Integer, GreatTradeAreaEvent> getAreaEventMap() {
        return areaEventMap;
    }

    public void setAreaEventMap(Map<Integer, GreatTradeAreaEvent> areaEventMap) {
        this.areaEventMap = areaEventMap;
        setUpdateOption();
    }

    public Map<Integer, GreatTradeSaltWorks> getSaltWorksMap() {
        return saltWorksMap;
    }

    public void setSaltWorksMap(Map<Integer, GreatTradeSaltWorks> saltWorksMap) {
        this.saltWorksMap = saltWorksMap;
        setUpdateOption();
    }

    public List<GreatTradeMilepostRecord> getMilepostRecordList() {
        return milepostRecordList;
    }

    public void setMilepostRecordList(List<GreatTradeMilepostRecord> milepostRecordList) {
        this.milepostRecordList = milepostRecordList;
        setUpdateOption();
    }

    public List<Map<Integer, String>> getProfitMap() {
        return profitMap;
    }

    public void setProfitMap(List<Map<Integer, String>> profitMap) {
        this.profitMap = profitMap;
        setUpdateOption();
    }

    public int getDayResetTime() {
        return dayResetTime;
    }

    public void setDayResetTime(int dayResetTime) {
        if(this.dayResetTime != dayResetTime) {
            this.dayResetTime = dayResetTime;
            setUpdateOption();
        }
    }
}
